The operations of machines or devices may be controlled by motion control for controlling the movements of motors. Such motion control may be performed typically by a programmable controller that can use a single central processing unit (CPU) to implement motion computing programs for cyclically outputting command values to motor drivers for driving motors, and to implement sequence computing.
For example, Patent Literature 1 describes a programmable controller that can execute motion computing programs for cyclically outputting command values to motor drivers for driving motors.
The controller described in Patent Literature 1 includes a first control program (short-cycle motion program) including a first motion computing program, which is executed in a first control cycle, and a second control program including a second motion computing program (long-cycle motion program). The second control program is executed in a cycle that is an integral multiple of the first control cycle to output command values to motors. The second control program is executed after the execution of the first control program completes.
When the second control program is incomplete within the predetermined control cycle, an unprocessed portion of the second control program is executed in the subsequent control cycle of the first control program after completion of the first control program.